#ifndef	_Task_Core_H
#define	_Task_Core_H
#include "Public.h"

#define SCB_ICSR  (*((volatile uint32_t *)0xE000ED04))

typedef	struct TCB
{
	uint32_t *Stack_Ptr;
	void(*Task_Entry)(void *param);
	void *param;
	struct TCB *Next_TCB,*PreV_TCB; 
}TCB;

void task_switch(void);
void Scheduler(void);
uint32_t *Task_Stack_Init(void(*entry),void *param,uint32_t *stack_top);
void Task_Create(TCB *tcb,void(*entry)(void*),void *param,uint32_t *stack);
void Task_Add(TCB *new_task);
#endif

